import { ExtBigIdTuple } from "~/db.pg";

import { ExtOwner } from "@/stream-user/core.define";
import { TonOrder } from "@/river-ton/schema.order";

import { NotchAble, Stockable } from "@/river-stock/core.define";
import { StockNode } from "@/river-stock/schema.node";
import { Tradable } from "~/extend";

/** 订单库存 */
export type OrderStock = ExtBigIdTuple &
  ExtOwner &
  Tradable &
  NotchAble & {
    justTonOrder?: TonOrder;
  };

/** 常规库存 */
export type CommonStock = ExtBigIdTuple &
  ExtOwner &
  Stockable &
  NotchAble & {
    refStockNodeId: StockNode["id"];
    justStockNode?: StockNode;
  };
